<template>
  <div>
    <el-table :data="tableData" v-loading="isLoading">
      <el-table-column prop="id" label="id" width="60" />
      <el-table-column
        prop="materialName"
        label="配件名称"
        :show-overflow-tooltip="true"
      />
      <el-table-column prop="num" label="数量" />
      <el-table-column prop="repairUserName" label="领用人员" />
      <el-table-column prop="createTime" label="领用时间" />
    </el-table>
  </div>
</template>
<script>
export default {
  name: "MaterialLog",
  data() {
    return {
      isLoading: false,
      tableData: []
    }
  },
  methods: {
    getData() {
      this.isLoading = true;
      this.getRequest("/material/log/list").then((resp) => {
        if (resp) {
          this.tableData = resp;
        }
        this.isLoading = false
      })
    }
  },
  created() {
    this.getData();
  }
};
</script>
<style lang="css" scoped></style>
